package cn.csddxt.dao;

import java.util.List;

import org.apache.ibatis.session.SqlSession;

import cn.csdd.service.RoleService;
import cn.csddxt.entity.Role;
import cn.csddxt.util.MybatisUtile;

public class RoleDao {
	public static RoleDao roledao = new RoleDao();

	public List<Role> roleAll() {
		SqlSession sq = MybatisUtile.mutile.getsqlSession();
		List<Role> list = sq.getMapper(RoleService.class).RoleAll();
		return list;
	}

	public static void main(String[] args) {
		List<Role> in = RoleDao.roledao.roleAll();
		for (Role role : in) {
			System.out.println(role.getRoleName() + "-------" + role.getId());
		}
	}
}
